﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

/// <summary>
/// Summary description for TuVanEntity
/// </summary>
public class TuVanEntity
{

    private int idtv;
    private string tieuDe;
    private string gioiThieu;
    private DateTime ngayNhap;
    private string noiDung;
    private string hinhDaiDien;
    private string nguon;
    public TuVanEntity()
    { }
    public TuVanEntity(int idtv, string tieuDe, string gioiThieu, DateTime ngayNhap, string noiDung, string hinhDaiDien, string nguon)
    {
        this.idtv = idtv;
        this.tieuDe = tieuDe;
        this.gioiThieu = gioiThieu;
        this.ngayNhap = ngayNhap;
        this.noiDung = noiDung;
        this.hinhDaiDien = hinhDaiDien;
        this.nguon = nguon;
    }
    public int Idtv
    {
        get { return this.idtv; }
        set
        {
            if (value == null)
                throw new Exception("idtv not allow nullvalue.");
            this.idtv = value;
        }
    }
    public string TieuDe
    {
        get { return this.tieuDe; }
        set { this.tieuDe = value; }
    }
    public string GioiThieu
    {
        get { return this.gioiThieu; }
        set { this.gioiThieu = value; }
    }
    public DateTime NgayNhap
    {
        get { return this.ngayNhap; }
        set { this.ngayNhap = value; }
    }
    public string NoiDung
    {
        get { return this.noiDung; }
        set { this.noiDung = value; }
    }
    public string HinhDaiDien
    {
        get { return this.hinhDaiDien; }
        set { this.hinhDaiDien = value; }
    }
    public string Nguon
    {
        get { return this.nguon; }
        set { this.nguon = value; }
    }
    public override string ToString()
    {
        return this.idtv + "; " + this.tieuDe + "; " + this.gioiThieu + "; " + this.ngayNhap + "; " + this.noiDung + "; " + this.hinhDaiDien + "; " + this.nguon + "; ";
    }
    public override bool Equals(Object obj)
    {
        TuVanEntity me = (TuVanEntity)obj;
        bool ret = this.Idtv.Equals(me.Idtv);
        return ret;
    }
    public override int GetHashCode()
    {
        return this.Idtv.GetHashCode();
    }
}